Option Strict Off
Option Explicit On
Module PauseDelay
	'This module pauses the program for a specific number of milliseconds as specified in the SecRequired variable.
	
	
	Private Declare Function timeGetTime Lib "winmm.dll" () As Integer
	
	Dim TimeStartDelay, TimeEndDelay As Double
	
	Public Sub PauseDelay123(ByRef SecRequired As Double)
		
		TimeEndDelay = timeGetTime() + (SecRequired)
KeepCounting: 
		TimeStartDelay = timeGetTime() 'stores the current time
		If TimeStartDelay < TimeEndDelay Then GoTo KeepCounting 'loop until end time is reached
	End Sub
End Module